<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

<h1>用户列表</h1>

	<a href="add.jsp">新增用户</a><br>
	<a href="add_ajax.jsp">新增用户(ajax)</a><br>
	<table border="1">
		<tr>
			<th>id</th><th>name</th><th>password</th><th>more</th>
		</tr>
		<c:forEach var="user" items="${userList}">
			<tr>
				<td>
                	<c:out value="${user.id}" />
            	</td>
            	<td>
                	<c:out value="${user.name}" />
            	</td>
            	<td>
                	<c:out value="${user.password}" />
            	</td>
            	<td>
                	<a href="UpdateViewServlet?id=${user.id}">修改</a> <a href="DeleteServlet?id=${user.id}">删除</a>
            	</td>
            </tr>
		</c:forEach>
	</table>

</body>
</html>